3.3.57 \(\int \frac {\sec (e+f x)}{(a+b \sec (e+f x)) (c+d \sec (e+f x))^2} \, dx\) [257]
Optimal. Leaf size=187 \[ \frac {2 b^2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b} (b c-a d)^2 f}-\frac {2 d \left (2 b c^2-a c d-b d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{(c-d)^{3/2} (c+d)^{3/2} (b c-a d)^2 f}+\frac {d^2 \sin (e+f x)}{(b c-a d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))} \]
[Out]
-2*d*(-a*c*d+2*b*c^2-b*d^2)*arctanh((c-d)^(1/2)*tan(1/2*f*x+1/2*e)/(c+d)^(1/2))/(c-d)^(3/2)/(c+d)^(3/2)/(-a*d+
b*c)^2/f+d^2*sin(f*x+e)/(-a*d+b*c)/(c^2-d^2)/f/(d+c*cos(f*x+e))+2*b^2*arctanh((a-b)^(1/2)*tan(1/2*f*x+1/2*e)/(
a+b)^(1/2))/(-a*d+b*c)^2/f/(a-b)^(1/2)/(a+b)^(1/2)
________________________________________________________________________________________
Rubi [A]
time = 0.42, antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {4073, 3135,
3080, 2738, 214} \begin {gather*} \frac {2 b^2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{f \sqrt {a-b} \sqrt {a+b} (b c-a d)^2}+\frac {d^2 \sin (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c \cos (e+f x)+d)}-\frac {2 d \left (-a c d+2 b c^2-b d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{f (c-d)^{3/2} (c+d)^{3/2} (b c-a d)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[Sec[e + f*x]/((a + b*Sec[e + f*x])*(c + d*Sec[e + f*x])^2),x]
[Out]
(2*b^2*ArcTanh[(Sqrt[a - b]*Tan[(e + f*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(b*c - a*d)^2*f) - (2*d*(
2*b*c^2 - a*c*d - b*d^2)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/((c - d)^(3/2)*(c + d)^(3/2)*(b*
c - a*d)^2*f) + (d^2*Sin[e + f*x])/((b*c - a*d)*(c^2 - d^2)*f*(d + c*Cos[e + f*x]))
Rule 214
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]
Rule 2738
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 3080
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] + Dist[(B*c - A
*d)/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
&& NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Rule 3135
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (C_.)*s
in[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 + a^2*C))*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*((c
+ d*Sin[e + f*x])^(n + 1)/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2))), x] + Dist[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)),
Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[a*(m + 1)*(b*c - a*d)*(A + C) + d*(A*b^2 + a^2*C
)*(m + n + 2) - (c*(A*b^2 + a^2*C) + b*(m + 1)*(b*c - a*d)*(A + C))*Sin[e + f*x] - d*(A*b^2 + a^2*C)*(m + n +
3)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2,
0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !(IntegerQ[2*n] && L
tQ[n, -1] && ((IntegerQ[n] && !IntegerQ[m]) || EqQ[a, 0])))
Rule 4073
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[1/g^(m + n), Int[(g*Csc[e + f*x])^(m + n + p)*(b + a*Sin[e + f*x])^m*(d
+ c*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[b*c - a*d, 0] && IntegerQ[m] && Inte
gerQ[n]
Rubi steps
\begin {align*} \int \frac {\sec (e+f x)}{(a+b \sec (e+f x)) (c+d \sec (e+f x))^2} \, dx &=\int \frac {\cos ^2(e+f x)}{(b+a \cos (e+f x)) (d+c \cos (e+f x))^2} \, dx\\ &=\frac {d^2 \sin (e+f x)}{(b c-a d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))}+\frac {\int \frac {-b c d-\left (a c d-b \left (c^2-d^2\right )\right ) \cos (e+f x)}{(b+a \cos (e+f x)) (d+c \cos (e+f x))} \, dx}{(b c-a d) \left (c^2-d^2\right )}\\ &=\frac {d^2 \sin (e+f x)}{(b c-a d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))}+\frac {b^2 \int \frac {1}{b+a \cos (e+f x)} \, dx}{(b c-a d)^2}+\frac {\left (d \left (a c d-b \left (2 c^2-d^2\right )\right )\right ) \int \frac {1}{d+c \cos (e+f x)} \, dx}{(b c-a d)^2 \left (c^2-d^2\right )}\\ &=\frac {d^2 \sin (e+f x)}{(b c-a d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))}+\frac {\left (2 b^2\right ) \text {Subst}\left (\int \frac {1}{a+b+(-a+b) x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{(b c-a d)^2 f}+\frac {\left (2 d \left (a c d-b \left (2 c^2-d^2\right )\right )\right ) \text {Subst}\left (\int \frac {1}{c+d+(-c+d) x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{(b c-a d)^2 \left (c^2-d^2\right ) f}\\ &=\frac {2 b^2 \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b} (b c-a d)^2 f}-\frac {2 d \left (2 b c^2-a c d-b d^2\right ) \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{(c-d)^{3/2} (c+d)^{3/2} (b c-a d)^2 f}+\frac {d^2 \sin (e+f x)}{(b c-a d) \left (c^2-d^2\right ) f (d+c \cos (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.71, size = 229, normalized size = 1.22 \begin {gather*} \frac {-2 b^2 \left (c^2-d^2\right )^{3/2} \tanh ^{-1}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right ) (d+c \cos (e+f x))-\sqrt {a^2-b^2} d \left (-2 \left (2 b c^2-a c d-b d^2\right ) \tanh ^{-1}\left (\frac {(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right ) (d+c \cos (e+f x))+d (-b c+a d) \sqrt {c^2-d^2} \sin (e+f x)\right )}{\sqrt {a^2-b^2} (c-d) (c+d) (b c-a d)^2 \sqrt {c^2-d^2} f (d+c \cos (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[Sec[e + f*x]/((a + b*Sec[e + f*x])*(c + d*Sec[e + f*x])^2),x]
[Out]
(-2*b^2*(c^2 - d^2)^(3/2)*ArcTanh[((-a + b)*Tan[(e + f*x)/2])/Sqrt[a^2 - b^2]]*(d + c*Cos[e + f*x]) - Sqrt[a^2
- b^2]*d*(-2*(2*b*c^2 - a*c*d - b*d^2)*ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(d + c*Cos[e + f*
x]) + d*(-(b*c) + a*d)*Sqrt[c^2 - d^2]*Sin[e + f*x]))/(Sqrt[a^2 - b^2]*(c - d)*(c + d)*(b*c - a*d)^2*Sqrt[c^2
- d^2]*f*(d + c*Cos[e + f*x]))
________________________________________________________________________________________
Maple [A]
time = 1.18, size = 208, normalized size = 1.11
| | |
method |
result |
size |
| | |
derivativedivides |
\(\frac {\frac {2 b^{2} \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a d -b c \right )^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {2 d \left (-\frac {d \left (a d -b c \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (c^{2}-d^{2}\right ) \left (c \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-d \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-c -d \right )}-\frac {\left (a c d -2 b \,c^{2}+b \,d^{2}\right ) \arctanh \left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c +d \right ) \left (c -d \right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (a d -b c \right )^{2}}}{f}\) |
\(208\) |
default |
\(\frac {\frac {2 b^{2} \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a d -b c \right )^{2} \sqrt {\left (a +b \right ) \left (a -b \right )}}-\frac {2 d \left (-\frac {d \left (a d -b c \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (c^{2}-d^{2}\right ) \left (c \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-d \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )-c -d \right )}-\frac {\left (a c d -2 b \,c^{2}+b \,d^{2}\right ) \arctanh \left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (c +d \right ) \left (c -d \right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (a d -b c \right )^{2}}}{f}\) |
\(208\) |
risch |
\(\frac {2 i d^{2} \left (d \,{\mathrm e}^{i \left (f x +e \right )}+c \right )}{c \left (c^{2}-d^{2}\right ) \left (-a d +b c \right ) f \left ({\mathrm e}^{2 i \left (f x +e \right )} c +2 d \,{\mathrm e}^{i \left (f x +e \right )}+c \right )}+\frac {b^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} f}-\frac {b^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i a^{2}-i b^{2}-b \sqrt {a^{2}-b^{2}}}{a \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} f}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) a c}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}-\frac {2 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) b \,c^{2}}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}+\frac {d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) b}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}-\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i c^{2}-i d^{2}-\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) a c}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}+\frac {2 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i c^{2}-i d^{2}-\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) b \,c^{2}}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}-\frac {d^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i c^{2}-i d^{2}-\sqrt {c^{2}-d^{2}}\, d}{\sqrt {c^{2}-d^{2}}\, c}\right ) b}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}\) |
\(810\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(sec(f*x+e)/(a+b*sec(f*x+e))/(c+d*sec(f*x+e))^2,x,method=_RETURNVERBOSE)
[Out]
1/f*(2*b^2/(a*d-b*c)^2/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*f*x+1/2*e)/((a+b)*(a-b))^(1/2))-2*d/(a*d-b*c)
^2*(-d*(a*d-b*c)/(c^2-d^2)*tan(1/2*f*x+1/2*e)/(c*tan(1/2*f*x+1/2*e)^2-d*tan(1/2*f*x+1/2*e)^2-c-d)-(a*c*d-2*b*c
^2+b*d^2)/(c+d)/(c-d)/((c+d)*(c-d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2))))
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(f*x+e)/(a+b*sec(f*x+e))/(c+d*sec(f*x+e))^2,x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
for more de
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 658 vs.
\(2 (169) = 338\).
time = 98.58, size = 2863, normalized size = 15.31 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(f*x+e)/(a+b*sec(f*x+e))/(c+d*sec(f*x+e))^2,x, algorithm="fricas")
[Out]
[1/2*((b^2*c^4*d - 2*b^2*c^2*d^3 + b^2*d^5 + (b^2*c^5 - 2*b^2*c^3*d^2 + b^2*c*d^4)*cos(f*x + e))*sqrt(a^2 - b^
2)*log((2*a*b*cos(f*x + e) - (a^2 - 2*b^2)*cos(f*x + e)^2 + 2*sqrt(a^2 - b^2)*(b*cos(f*x + e) + a)*sin(f*x + e
) + 2*a^2 - b^2)/(a^2*cos(f*x + e)^2 + 2*a*b*cos(f*x + e) + b^2)) + (2*(a^2*b - b^3)*c^2*d^2 - (a^3 - a*b^2)*c
*d^3 - (a^2*b - b^3)*d^4 + (2*(a^2*b - b^3)*c^3*d - (a^3 - a*b^2)*c^2*d^2 - (a^2*b - b^3)*c*d^3)*cos(f*x + e))
*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 - 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) +
c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) + 2*((a^2*b - b^3)*c^3*d^2 - (
a^3 - a*b^2)*c^2*d^3 - (a^2*b - b^3)*c*d^4 + (a^3 - a*b^2)*d^5)*sin(f*x + e))/(((a^2*b^2 - b^4)*c^7 - 2*(a^3*b
- a*b^3)*c^6*d + (a^4 - 3*a^2*b^2 + 2*b^4)*c^5*d^2 + 4*(a^3*b - a*b^3)*c^4*d^3 - (2*a^4 - 3*a^2*b^2 + b^4)*c^
3*d^4 - 2*(a^3*b - a*b^3)*c^2*d^5 + (a^4 - a^2*b^2)*c*d^6)*f*cos(f*x + e) + ((a^2*b^2 - b^4)*c^6*d - 2*(a^3*b
- a*b^3)*c^5*d^2 + (a^4 - 3*a^2*b^2 + 2*b^4)*c^4*d^3 + 4*(a^3*b - a*b^3)*c^3*d^4 - (2*a^4 - 3*a^2*b^2 + b^4)*c
^2*d^5 - 2*(a^3*b - a*b^3)*c*d^6 + (a^4 - a^2*b^2)*d^7)*f), 1/2*(2*(b^2*c^4*d - 2*b^2*c^2*d^3 + b^2*d^5 + (b^2
*c^5 - 2*b^2*c^3*d^2 + b^2*c*d^4)*cos(f*x + e))*sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(f*x + e) + a)
/((a^2 - b^2)*sin(f*x + e))) + (2*(a^2*b - b^3)*c^2*d^2 - (a^3 - a*b^2)*c*d^3 - (a^2*b - b^3)*d^4 + (2*(a^2*b
- b^3)*c^3*d - (a^3 - a*b^2)*c^2*d^2 - (a^2*b - b^3)*c*d^3)*cos(f*x + e))*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x +
e) - (c^2 - 2*d^2)*cos(f*x + e)^2 - 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*c
os(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) + 2*((a^2*b - b^3)*c^3*d^2 - (a^3 - a*b^2)*c^2*d^3 - (a^2*b - b^3)*
c*d^4 + (a^3 - a*b^2)*d^5)*sin(f*x + e))/(((a^2*b^2 - b^4)*c^7 - 2*(a^3*b - a*b^3)*c^6*d + (a^4 - 3*a^2*b^2 +
2*b^4)*c^5*d^2 + 4*(a^3*b - a*b^3)*c^4*d^3 - (2*a^4 - 3*a^2*b^2 + b^4)*c^3*d^4 - 2*(a^3*b - a*b^3)*c^2*d^5 + (
a^4 - a^2*b^2)*c*d^6)*f*cos(f*x + e) + ((a^2*b^2 - b^4)*c^6*d - 2*(a^3*b - a*b^3)*c^5*d^2 + (a^4 - 3*a^2*b^2 +
2*b^4)*c^4*d^3 + 4*(a^3*b - a*b^3)*c^3*d^4 - (2*a^4 - 3*a^2*b^2 + b^4)*c^2*d^5 - 2*(a^3*b - a*b^3)*c*d^6 + (a
^4 - a^2*b^2)*d^7)*f), -1/2*(2*(2*(a^2*b - b^3)*c^2*d^2 - (a^3 - a*b^2)*c*d^3 - (a^2*b - b^3)*d^4 + (2*(a^2*b
- b^3)*c^3*d - (a^3 - a*b^2)*c^2*d^2 - (a^2*b - b^3)*c*d^3)*cos(f*x + e))*sqrt(-c^2 + d^2)*arctan(-sqrt(-c^2 +
d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f*x + e))) - (b^2*c^4*d - 2*b^2*c^2*d^3 + b^2*d^5 + (b^2*c^5 - 2*b
^2*c^3*d^2 + b^2*c*d^4)*cos(f*x + e))*sqrt(a^2 - b^2)*log((2*a*b*cos(f*x + e) - (a^2 - 2*b^2)*cos(f*x + e)^2 +
2*sqrt(a^2 - b^2)*(b*cos(f*x + e) + a)*sin(f*x + e) + 2*a^2 - b^2)/(a^2*cos(f*x + e)^2 + 2*a*b*cos(f*x + e) +
b^2)) - 2*((a^2*b - b^3)*c^3*d^2 - (a^3 - a*b^2)*c^2*d^3 - (a^2*b - b^3)*c*d^4 + (a^3 - a*b^2)*d^5)*sin(f*x +
e))/(((a^2*b^2 - b^4)*c^7 - 2*(a^3*b - a*b^3)*c^6*d + (a^4 - 3*a^2*b^2 + 2*b^4)*c^5*d^2 + 4*(a^3*b - a*b^3)*c
^4*d^3 - (2*a^4 - 3*a^2*b^2 + b^4)*c^3*d^4 - 2*(a^3*b - a*b^3)*c^2*d^5 + (a^4 - a^2*b^2)*c*d^6)*f*cos(f*x + e)
+ ((a^2*b^2 - b^4)*c^6*d - 2*(a^3*b - a*b^3)*c^5*d^2 + (a^4 - 3*a^2*b^2 + 2*b^4)*c^4*d^3 + 4*(a^3*b - a*b^3)*
c^3*d^4 - (2*a^4 - 3*a^2*b^2 + b^4)*c^2*d^5 - 2*(a^3*b - a*b^3)*c*d^6 + (a^4 - a^2*b^2)*d^7)*f), ((b^2*c^4*d -
2*b^2*c^2*d^3 + b^2*d^5 + (b^2*c^5 - 2*b^2*c^3*d^2 + b^2*c*d^4)*cos(f*x + e))*sqrt(-a^2 + b^2)*arctan(-sqrt(-
a^2 + b^2)*(b*cos(f*x + e) + a)/((a^2 - b^2)*sin(f*x + e))) - (2*(a^2*b - b^3)*c^2*d^2 - (a^3 - a*b^2)*c*d^3 -
(a^2*b - b^3)*d^4 + (2*(a^2*b - b^3)*c^3*d - (a^3 - a*b^2)*c^2*d^2 - (a^2*b - b^3)*c*d^3)*cos(f*x + e))*sqrt(
-c^2 + d^2)*arctan(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f*x + e))) + ((a^2*b - b^3)*c^3*d^2
- (a^3 - a*b^2)*c^2*d^3 - (a^2*b - b^3)*c*d^4 + (a^3 - a*b^2)*d^5)*sin(f*x + e))/(((a^2*b^2 - b^4)*c^7 - 2*(a
^3*b - a*b^3)*c^6*d + (a^4 - 3*a^2*b^2 + 2*b^4)*c^5*d^2 + 4*(a^3*b - a*b^3)*c^4*d^3 - (2*a^4 - 3*a^2*b^2 + b^4
)*c^3*d^4 - 2*(a^3*b - a*b^3)*c^2*d^5 + (a^4 - a^2*b^2)*c*d^6)*f*cos(f*x + e) + ((a^2*b^2 - b^4)*c^6*d - 2*(a^
3*b - a*b^3)*c^5*d^2 + (a^4 - 3*a^2*b^2 + 2*b^4)*c^4*d^3 + 4*(a^3*b - a*b^3)*c^3*d^4 - (2*a^4 - 3*a^2*b^2 + b^
4)*c^2*d^5 - 2*(a^3*b - a*b^3)*c*d^6 + (a^4 - a^2*b^2)*d^7)*f)]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec {\left (e + f x \right )}}{\left (a + b \sec {\left (e + f x \right )}\right ) \left (c + d \sec {\left (e + f x \right )}\right )^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(f*x+e)/(a+b*sec(f*x+e))/(c+d*sec(f*x+e))**2,x)
[Out]
Integral(sec(e + f*x)/((a + b*sec(e + f*x))*(c + d*sec(e + f*x))**2), x)
________________________________________________________________________________________
Giac [A]
time = 0.54, size = 331, normalized size = 1.77 \begin {gather*} -\frac {2 \, {\left (\frac {{\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )} b^{2}}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-a^{2} + b^{2}}} + \frac {d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (b c^{3} - a c^{2} d - b c d^{2} + a d^{3}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c - d\right )}} - \frac {{\left (2 \, b c^{2} d - a c d^{2} - b d^{3}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, c - 2 \, d\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )}}{{\left (b^{2} c^{4} - 2 \, a b c^{3} d + a^{2} c^{2} d^{2} - b^{2} c^{2} d^{2} + 2 \, a b c d^{3} - a^{2} d^{4}\right )} \sqrt {-c^{2} + d^{2}}}\right )}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(f*x+e)/(a+b*sec(f*x+e))/(c+d*sec(f*x+e))^2,x, algorithm="giac")
[Out]
-2*((pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*a - 2*b) + arctan((a*tan(1/2*f*x + 1/2*e) - b*tan(1/2*f*x + 1/2*e)
)/sqrt(-a^2 + b^2)))*b^2/((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(-a^2 + b^2)) + d^2*tan(1/2*f*x + 1/2*e)/((b*c^3
- a*c^2*d - b*c*d^2 + a*d^3)*(c*tan(1/2*f*x + 1/2*e)^2 - d*tan(1/2*f*x + 1/2*e)^2 - c - d)) - (2*b*c^2*d - a*
c*d^2 - b*d^3)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(2*c - 2*d) + arctan((c*tan(1/2*f*x + 1/2*e) - d*tan(1/2*f
*x + 1/2*e))/sqrt(-c^2 + d^2)))/((b^2*c^4 - 2*a*b*c^3*d + a^2*c^2*d^2 - b^2*c^2*d^2 + 2*a*b*c*d^3 - a^2*d^4)*s
qrt(-c^2 + d^2)))/f
________________________________________________________________________________________
Mupad [B]
time = 15.42, size = 2500, normalized size = 13.37 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(1/(cos(e + f*x)*(a + b/cos(e + f*x))*(c + d/cos(e + f*x))^2),x)
[Out]
(2*d^2*tan(e/2 + (f*x)/2))/(f*(c + d)*(c + d - tan(e/2 + (f*x)/2)^2*(c - d))*(a*d^2 + b*c^2 - a*c*d - b*c*d))
- (d*atan(((d*((32*tan(e/2 + (f*x)/2)*(b^5*c^6 + 2*b^5*d^6 - a*b^4*c^6 - 4*a*b^4*d^6 - 2*b^5*c*d^5 - 2*b^5*c^5
*d + 3*a^2*b^3*d^6 - a^3*b^2*d^6 - a^5*c^2*d^4 - 5*b^5*c^2*d^4 + 4*b^5*c^3*d^3 + 3*b^5*c^4*d^2 + 13*a*b^4*c^2*
d^4 - 8*a*b^4*c^3*d^3 - 11*a*b^4*c^4*d^2 - 6*a^2*b^3*c*d^5 + 6*a^3*b^2*c*d^5 + 3*a^4*b*c^2*d^4 + 4*a^4*b*c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b^7*c^9 + a^6*b*d^9 + a^7*c*d^8 + 2*b^7*c^8*d - a
^2*b^5*c^9 + a^4*b^3*d^9 - 2*a^5*b^2*d^9 - a^7*c^2*d^7 - a^7*c^3*d^6 + a^7*c^4*d^5 + b^7*c^4*d^5 - 3*b^7*c^6*d
^3 + b^7*c^7*d^2 - 4*a*b^6*c^3*d^6 - 2*a*b^6*c^4*d^5 + 13*a*b^6*c^5*d^4 + a*b^6*c^6*d^3 - 11*a*b^6*c^7*d^2 - 8
*a^2*b^5*c^8*d - 4*a^3*b^4*c*d^8 + 5*a^3*b^4*c^...
________________________________________________________________________________________